<ion-header>
  <ion-toolbar>
    <ion-title>Ionic 4 BarCode Scanner Demo</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content padding>

  <h1>Click To Scan</h1>

  <ion-button color="secondary" (click)="scanCode()">Scan Code</ion-button>
  <!-- <button ion-button round (click)="scanCode()">Scan Code</button> -->

  <div *ngIf="scannedData">
    <p>Scanned Code Text : <b>{{scannedData['text']}}</b></p>
    <p>Scanned Code Format : <b>{{scannedData['format']}}</b></p>
  </div>



  <h1>Click To Generate QR Code</h1>

  <ion-input type="text" [(ngModel)]="encodeData"></ion-input>
  <!-- <button ion-button (click)="encodedText()">Encode Text</button> -->
  <ion-button color="success" (click)="encodedText()">Encode Text</ion-button>


</ion-content>
